/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.cms.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.thinkgem.jeesite.common.persistence.CrudDao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.cms.entity.TaskDataDis;
import com.thinkgem.jeesite.modules.cms.entity.TaskOperation;
import com.thinkgem.jeesite.modules.cms.entity.dayCheckUserid;
import com.thinkgem.jeesite.modules.cms.entity.dayProgress;
import com.thinkgem.jeesite.modules.cms.entity.taskDaydata;

/**
 * 子任务管理DAO接口
 * @author leo
 * @version 2017-02-16
 */
@MyBatisDao
public interface TaskOperationDao extends CrudDao<TaskOperation> {
	
	public abstract List<TaskOperation> findList2(TaskOperation entity);
	public abstract List<TaskOperation> findListForChange(TaskOperation entity);
	
	public abstract List<TaskOperation> getYeardata(@Param("userid") String paramString, @Param("year") int paramInt);
	  
	public abstract List<taskDaydata> getMonthdata(@Param("userid") String paramString1, @Param("year") int paramInt, @Param("month") String paramString2);
	  
	public abstract List<TaskOperation> getDaydata(@Param("userid") String paramString1, @Param("pdate") String paramString2);
	
	public abstract List<TaskOperation> getnostartdata(@Param("userid") String paramString1,@Param("sdate") Date sdate,@Param("edate") Date edate);
	public abstract List<TaskOperation> getisstartnoend(@Param("userid") String paramString1);
	 
	public abstract List<TaskDataDis> gettodaydtlbyuserid(@Param("userid") String paramString1,@Param("sdate") Date sdate);
	public abstract List<TaskDataDis> getnostartdata2(@Param("userid") String paramString1,@Param("sdate") Date sdate,@Param("edate") Date edate);
	public abstract List<TaskDataDis> getisstartnoend2(@Param("userid") String paramString1);
	
	public abstract TaskOperation getByKeyfield(@Param("keyfield") String paramString);
	  
	public abstract List<TaskOperation> getNoEnd();
	  
	public abstract TaskOperation getByProductid(@Param("productid") String paramString);
	
	public abstract List<TaskOperation> getByProdid(@Param("productid") String paramString);
	public abstract List<TaskOperation> getByProdid2(@Param("productid") String paramString);
	  
	public abstract TaskOperation getStartProductid(@Param("productid") String paramString);
	  
	public abstract int clear(@Param("end") String paramString);
	  
	public abstract int updateA(String paramString1, String paramString2);
	public abstract int updateB(String paramString1, String paramString2);
	public abstract int updateC(String paramString1, String paramString2);
	public abstract int updateD(String paramString1, String paramString2);
	public abstract int updateE(String paramString1, String paramString2);
	public abstract int updateF(String paramString1, String paramString2);
	public abstract int updateG(String paramString1, String paramString2);
	public abstract int updateH(String paramString1, String paramString2);
	  
	public abstract int updateIsStart(@Param("keyfield") String paramString1, @Param("isstart") int paramInt, @Param("userid") String paramString2);
	  
	public abstract int updateNoOk(@Param("productid") String paramString);
	  
	public abstract int updateOk(@Param("productid") String paramString);
	
	public abstract int updateproductcomplete(@Param("productid") String paramString);
	  
	public abstract int updateIsTaskComplete(@Param("keyfield") String paramString1, @Param("istaskcomplete") int paramInt, @Param("userid") String paramString2);
	  
	public abstract int updateIsPartComplete(@Param("keyfield") String paramString);
	  
	public abstract int updateIsTaskQcComplete(@Param("keyfield") String paramString, @Param("istaskcomplete") int paramInt);

	public abstract List<TaskOperation> findListIn(String[] split);
	
	public abstract List<TaskOperation> findListByPNUid(@Param("productid") String productid,@Param("userid") String userid);
	
	public abstract List<TaskOperation> getByPNAndTcompl(@Param("productid") String productid,@Param("userid") String userid);
	
	public abstract List<TaskOperation> getByGroupId(@Param("groupid") String groupid);
	
	public abstract List<TaskOperation> getByGroupIdStart(@Param("groupid") String groupid,@Param("userid") String userid);
	
	public abstract List<TaskOperation> getByGroupIdEnd(@Param("groupid") String groupid);
	
	public abstract int getgroupstart(@Param("groupid") String groupid,@Param("userid") String userid);
	
	public abstract int getgroupcomplete(@Param("groupid") String groupid,@Param("userid") String userid);
	
	public abstract int updateGroupStart(@Param("groupid") String groupid, @Param("isstart") int paramInt,@Param("userid") String userid);
	public abstract List<TaskOperation> getupdateGroupStart(@Param("groupid") String groupid,@Param("userid") String userid);
	
	public abstract int updateGroupComplete(@Param("groupid") String groupid,@Param("istaskcomplete") int paramInt,@Param("userid") String userid);

	public abstract List<String> checkIsokbygroup(@Param("groupid") String groupid,@Param("userid") String userid);
	public abstract Integer checkIsComplbygroup(@Param("groupid") String groupid,@Param("userid") String userid);
	public abstract List<TaskOperation> getIsComplbygroup(@Param("groupid") String groupid,@Param("userid") String userid);
	
	public abstract int deletegroupid(@Param("id") String id);
	
	
	public abstract List<dayCheckUserid> daycheckuiddata(@Param("pdate") Date pdate);
	
	public abstract List<dayProgress> dayProgressdata(@Param("sql") String sql);
	
	
	public abstract List<TaskOperation> getTaskByDateDept(@Param("pdate") Date pdate,@Param("deptid") String deptid);
	public abstract Integer istaskcompleteByPid(String productid);
	
}